package com.itheima.udp3;

import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.InetAddress;
import java.net.SocketException;
import java.util.Scanner;

public class Client {

    public static void main(String[] args) throws Exception {
        DatagramSocket ds = new DatagramSocket();
        while (true) {
            String s=new Scanner(System.in).nextLine();
            InetAddress ip = InetAddress.getByName("224.0.1.0");
            int port=8888;
            DatagramPacket dp = new DatagramPacket(s.getBytes(),s.getBytes().length,ip,port);
            ds.send(dp);
        }


       // ds.close();


    }
}
